package enums;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.Getter;
import lombok.NoArgsConstructor;

@Getter
@NoArgsConstructor
@AllArgsConstructor
public enum ResultCode {

    //操作唱功
    SUCCESS (1000, "操作成功"),
    //服务器内部错误，友好提⽰
    ERROR (2000, "服务繁忙请稍后重试"),
    //操作失败，但是服务器不存在异常
    FAILED (3000, "操作失败"),
    FAILED_UNAUTHORIZED (3001, "未授权"),
    FAILED_PARAMS_VALIDATE (3002, "参数校验失败"),
    FAILED_NOT_EXISTS (3003, "资源不存在"),
    FAILED_ALREADY_EXISTS (3004, "资源已存在"),
    AILED_USER_EXISTS (3101, "⽤⼾已存在"),
    FAILED_USER_NOT_EXISTS (3102, "⽤⼾不存在"),
    FAILED_LOGIN (3103, "账号或密码错误"),
    FAILED_USER_BANNED (3104, "您已被列⼊⿊名单, 请联系管理员."),
    //重复添加了题目
    FAILED_QUESTION_EXISTS (3005, "重复添加了题目"),

    //验证码验证失败
    FAILED_CODE_ERROR (3105, "验证码验证失败"),
    //验证码不正确
    FAILED_CODE_INCORRECT (3106, "验证码不正确"),

    //开始时间小于当前时间
    FAILED_START_TIME_LESS_THAN_NOW (4001, "开始时间小于当前时间"),
    //结束时间小于开始时间
    FAILED_END_TIME_LESS_THAN_START_TIME (4002, "结束时间小于开始时间"),
    //结束时间小于当前时间
    FAILED_END_TIME_LESS_THAN_NOW (4003, "结束时间小于当前时间"),
    //开始时间大于结束时间
    FAILED_START_TIME_GREATER_THAN_END_TIME (4004, "开始时间大于结束时间"),
    //竞赛已经开始，不能修改
    FAILED_EXAM_STARTED (4005, "竞赛已经开始，不能操作"),
    //竞赛已经开始了，不能删除
    FAILED_EXAM_STARTED_CANNOT_DELETE (4006, "竞赛已经开始了，不能删除"),
    //请勿重复报名
    FAILED_EXAM_ALREADY_SIGNED_UP (4007, "请勿重复报名"),


    FAILED_NOT_SUPPORT_PROGRAM (4008, "不支持的语言类型");
    private int code;

    private String msg;
}
